package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.wms.domain.InventoryLog;
import com.xmtlxx.wms.domain.bo.InventoryLogBo;
import com.xmtlxx.wms.domain.vo.InventoryLogVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 库存记录Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface InventoryLogMapper extends BaseMapperPlus<InventoryLogMapper, InventoryLog, InventoryLogVo> {
    /**
     * 根据条件分页查询库存记录
     *
     * @param inventoryLog 库存记录
     * @return Page InventoryLog
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "i.create_by"),
        @DataColumn(key = "deptName", value = "i.dept_id"),
        @DataColumn(key = "userName", value = "i.create_by")
    })
    Page<InventoryLogVo> selectPageInventoryLogList(@Param("page") Page<InventoryLog> page,@Param("inventoryLog") InventoryLogBo inventoryLog);

    /**
     * 查询库存记录列表
     *
     * @param inventoryLog 库存记录
     * @return 库存记录集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "i.create_by"),
        @DataColumn(key = "deptName", value = "i.dept_id"),
        @DataColumn(key = "userName", value = "i.create_by")
    })
    List<InventoryLogVo> selectInventoryLogList(@Param("inventoryLog") InventoryLogBo inventoryLog);

    InventoryLogVo selectInventoryLogVoByID(String id);
}
